<?php

if (!defined('PUBLIC_HTML'))
{
	exit;
}

if ($user->is_admin)
{
	$tpl->zone("ADMIN", array());
}

$get_pages =	"
				SELECT		*
				FROM		" . TABLE_PAGES . "
				WHERE		page_parent_id = :page_parent_id
				ORDER BY	page_id
				ASC
				";
$database->query($get_pages);
$database->bind(':page_parent_id', 0);
foreach ($database->resultSet() as $row_pages)
{
	//$get_page_lang	=	$db->sql_get_row(TABLE_PAGES_LANG, 'pla_var', 'pla_page_id', $row_pages['page_id']);
	$tpl->zone('pages', array(
		'TITLE'	=> (string) $row_pages['page_title'],
		'VIEW'	=> (string) $row_pages['page_title'],
		'EDIT'	=> (string) 'cms.php?p=pages&act=edit&id='.(int) $row_pages['page_id'],
		'DELETE'	=> (string) 'cms.php?p=pages&act=delete&id='.(int) $row_pages['page_id'],
	));
}

?>